<template>
  切换路由：<router-link to="/">Home</router-link>

  <hr>
  <HelloWorld :msg="twiceTheCounter" :name="twiceTheCounter"></HelloWorld>

  <hr>
  <div>
    hooks: {{name}}
    <input type="text" v-model="$name">
    <button @click="setName($name)">修改</button>
  </div>
  <hr>
  <div> 国际化： {{message}} </div>
  <div>当前语言： {{locale}} {{$t("fast")}}</div>
  <div>
    <button @click="setLang('en');">英文</button>
    <button @click="setLang('cn');">中文</button>
  </div>

  <hr>
  userStore数据：
  {{userStore}}
  <button @click="userStore.setMessageAction('张三里斯')">更改store数据</button>

  <div>{{eeee}}</div>
</template>

<script>
import { useState } from "@/hooks"
import HelloWorld from "@/components/HelloWorld";

export default {
  data(){
    return {
      $name: ""
    }
  },
  components: {HelloWorld},
  setup(){
    const [ name, setName ] = useState({name: 1});
    return {
      name, setName
    }
  }
};
</script>

<style>
</style>
